package com.abocode.aichat.data;

import lombok.Data;

/**
 * Description:
 *
 * @author: guanxf
 * @date: 2020/9/7
 */
@Data
public class MessageCommand<T> implements MessageStanza<T> {
    private String id;
    private T body;
    private ModuleType moduleType;
    private ModuleServiceType moduleServiceType;

    @Override
    public ModuleType moduleType() {
        return moduleType;
    }

    @Override
    public ModuleServiceType moduleServiceType() {
        return moduleServiceType;
    }

    @Override
    public String id() {
        return id;
    }

    @Override
    public String token() {
        return token();
    }

    @Override
    public T body() {
        return body;
    }

    @Override
    public boolean validate() {
        return  true;
    }

    @Override
    public Entity findTo() {
      throw  new UnsupportedOperationException("不需要实现");
    }

    @Override
    public String name() {
        return moduleType.name();
    }
}
